/**
 * 
 */
package niuke.shenxinfu;

import java.util.Scanner;

/**
 * @author zhongfang
 *
 */
public class 循环求和 {

	/**
	 * @param args
	 */
	public static void main(String[] args) {
		Scanner scanner = new Scanner(System.in);
		int n = scanner.nextInt();
		scanner.close();
		double s = 0;
		boolean tag = true;
		for (double i = 1; i <= n; i++) {
			if (tag) {
				s += 1 / i;
			} else {
				s -= 1 / i;
			}
			tag = !tag;
		}
		System.out.println(String.format("%.8f", s));
	}

}
